package com.lin.service.impl;

import com.lin.entity.DynamicEntity;
import com.lin.entity.vo.DynamicEntityVO;

import com.lin.mapper.CommunityMapper;
import com.lin.mapper.DynamicMapper;

import com.lin.service.CommunityService.CommunityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CommunityServiceImpl implements CommunityService {
    @Autowired
    private DynamicMapper dynamicMapper;
    @Autowired
    private CommunityMapper communityMapper;
    /**
     * 新建动态信息
     * @param dynamic
     */
    public void savedynamic(DynamicEntity dynamic) {
        communityMapper.savedynamic(dynamic);
    }
    /**
     * 获取乐谱详情
     * @param id
     * @return
     */
    @Override
    public DynamicEntityVO getDynamicDetail(Integer id) {
        return dynamicMapper.getDynamicDetail(id);

    }
    /**
     * 更新乐谱数据
     * @param dynamicEntityVO
     */
    public void updateDynamic(DynamicEntityVO dynamicEntityVO) {
        dynamicMapper.updatedynamicEntity(dynamicEntityVO);
    }
}
